package com.lening.iot.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseServiceImpl;
import com.lening.iot.dao.MongroupDAO;
import com.lening.iot.dto.MongroupDTO;
import com.lening.iot.po.MongroupPO;
import com.lening.iot.service.MongroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 14:09
 */
@Service
public class MongroupServiceImpl extends BaseServiceImpl<MongroupDAO, MongroupPO, MongroupDTO> implements MongroupService{
    @Autowired(required = false)
    private MongroupDAO mongroupDAO;
    @Override
    public Page<MongroupDTO> getAllMmg(Page<MongroupDTO> monmangerDTOPage) {
        Page<MongroupDTO> mmgList = mongroupDAO.getAllMg(monmangerDTOPage);
        return mmgList;
    }

    @Override
    public List<MongroupDTO> getAll(String communityname) {
        return mongroupDAO.getAll(communityname);
    }

    @Override
    public Page<?> page(MongroupDTO mongroupDTO) {
        return mongroupDAO.getAllMg(mongroupDTO);
    }

    @Override
    public MongroupPO getById(Long id) {
        return this.mongroupDAO.getById(id);
    }
}
